

import React from "react";

import LoginPage from "@/PageCompnents/Login";
import RegisterPage from "@/PageCompnents/Register";
import LayoutContainer from "./Components/Layout";

function PageWrapper({ actKey, chartTap, login, register, header, menu, breadcrumb, list, add, home, chart }) {

  switch (actKey) {
    case 'login':
      return <LoginPage base={login.base} />

    case 'register':
      return <RegisterPage register={register} />

    case 'header':
    case 'menu':
    case 'breadcrumb':
    case 'list':
    case 'add':
    case 'home':
    case 'chart':
      return <LayoutContainer
        actKey={actKey}
        chartTap={chartTap}
        header={header}
        menu={menu}
        breadcrumb={breadcrumb}
        list={list}
        add={add}
        home={home}
        chart={chart}
      />

    default:
      return null
  }

}

export default React.memo(PageWrapper) 